package com.lyx.TestList;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.TreeSet;

public class TestSet01 {

    private static final int TREEIFY_THRESHOLD=8;

    public static void main(String[] args) {
        Set<String> set = new HashSet<String>();
        //Set<String> set = new LinkedHashSet<String>();
        //Set<String> set = new TreeSet<String>();

        set.add("你好");
        set.add("java");
        set.add("JavaScript");

        String g = "sfa";

        Integer a = 1;

        Double s = 1.2;
        Double s2 = new Double(2);

        String e;
        String p=null;

        for (int binCount = 0; ; ++binCount) {
            if ((e = p) == null) {
                p = "newNode(hash, key, value, null)";
                if (binCount >= TREEIFY_THRESHOLD - 1) // -1 for 1st
                    e=null;
                break;
            }

            p = e;
        }

        System.out.println(set.size());
        System.out.println(set.toString());
    }
}
